<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
	<head> 
		<meta name="description" content="Pitchtree Mobile" />
		<meta name="keywords" content="pitchtree, design, opdrachtgevers, ontwerpers" />
		<meta name="author" content="Pitchtree Mobile" />
		<meta name="viewport" content="min-width=320px, minimum-scale=1.0, maximum-scale=1.0" />
		<meta name="format-detection" content="telephone=no"/>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<title> <?php echo $title_for_layout?></title>
		<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
		<?php echo $this->Html->charset(); ?>
		<?php echo $this->Html->css('style'); ?>
		<?php echo $scripts_for_layout; ?>
		<base href="http://localhost/pitchtree/" />
	</head> 
	<body> 
		<div id="container"> 	
			<div id="header">
				<?php if (!$this->Session->read('Auth.User')): ?>
					<div class="login"><?php echo $this->Html->link('Login', array('controller' => 'users', 'action' => 'login')); ?></div>
				<?php else: ?>
					<?php
						$message_count = $this->requestAction(array('controller' => 'messages', 'action' => 'not_read'));
					?>
					<div class="mail"><a href="<?php echo $this->Html->url(array('controller' => 'messages', 'action' => 'inbox'));?>"><?php if ($message_count != 0): ?><span><?php echo $message_count; ?></span><?php endif; ?></a></div>
				<?php endif; ?>
				
				<?php if ($this->Session->read('Auth.User')): ?>
					<div class="home"><?php echo $this->Html->link('', array('controller' => 'users', 'action' => 'updates')); ?></div>
				<?php else: ?>
					<div class="home"><a href=" "></a></div>
				<?php endif; ?>				
				<div class="logo"><a href="http://www.pitchtree.nl/"></a></div>
			</div>
				<?php 
					echo $this->Session->flash();
					echo $this->Session->flash('auth');
					
					/*if (!$error == "") {
					echo "<div id='error'>" . $error . "</div>";
					}*/
					echo $content_for_layout;
				?>
			<div id="footer">
				<div id="footer-total">
					<div id="footer-l"><p>Copyright 2011</p></div>
					<div id="footer-m"><?php if ($this->Session->read('Auth.User')): echo $this->Html->link('Uitloggen', array('controller' => 'users', 'action' => 'logout')); endif;  ?></div>
					<div id="footer-r"><a href="http://www.pitchtree.nl/">Volledige website</a></div>
				</div>
			</div>
		</div> 
		
		<?php //echo $this->element('sql_dump'); ?>
		
	</body> 
</html> 
